package com.hrms.core;

public class Route {
	private String name;
	private String route;
	private String page;
	
	public Route(String name, String route, String page) {
		this.name = name;
		this.route = route;
		this.page = Constants.ROOT+page;
	}		
	
	public Route(String name, String route) {
		this(name, route,  route + ".jsp");
	}
	
	public Route(String route) {
		this(null, route);
	}

	public String getRoute() {
		return route;
	}
	public String getPage() {
		return page;
	}
	public void setRoute(String route) {
		this.route = route;
	}
	public void setPage(String page) {
		this.page = page;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return route;
	}		
	public boolean isRoute(Route r){
		return getRoute().equals(r.getRoute());
	}
}
